#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "AD.h"

uint16_t AD0 = 0;
uint16_t AD1 = 0;
uint16_t AD2 = 0;
uint16_t AD3 = 0;

int main(void)
{
	OLED_Init();
	AD_Init();
	OLED_ShowString(1, 1, "AD0:0000");
	OLED_ShowString(2, 1, "AD1:0000");
	OLED_ShowString(3, 1, "AD2:0000");
	while (1)
	{
		AD0 = AD_ValueGet(ADC_Channel_0);
		AD1 = AD_ValueGet(ADC_Channel_1);
		AD2 = AD_ValueGet(ADC_Channel_2);
		OLED_ShowNum(1, 7, AD0, 4);
		OLED_ShowNum(2, 7, AD1, 4);
		OLED_ShowNum(3, 7, AD2, 4);
	}
}
